package org.adorsys.aderp.jpa.api.xchange;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;


/**
 * This is a generic interface for synchronizing data among applications.
 * 
 * @author fpo
 *
 */
public interface XchangeRecordService {

	/**
	 * Provide change records associated with the corresponding entity. Only the last record is
	 * provided for each entity.
	 * 
	 * @param changeRequest
	 * @param pageable
	 * @return
	 */
	public DataResponse loadEntity(DataRequest dataRequest);
	
	/**
	 * Use this to navigate through a collection of entities.
	 * 
	 * @param dataQuery
	 * @param pageable
	 * @return
	 */
	public Page<DataResponse> searchEntities(DataQuery dataQuery, Pageable pageable);
}
